using System;

public static class IntegerExtensions
{
    public static int GetHighestDigit(this int number)
    {
        number = Math.Abs(number); 
        if (number == 0) return 0;

        while (number >= 10)
        {
            number /= 10; 
        }

        return number;
    }
}